<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=0,user-scalable=0">
    [#include "/wap/include/static.html"]
    <link rel="stylesheet" href="${path}/resources/wap/css/invest/invest.css"/>

</head>
<body>
<header>
    <p>投资</p>
</header>
<!--选项-->
<div class="option">
    <div class="option-child all   [#if !loanCategory?exists]active[/#if] "><a href="${path}/wap/bid/loanlist">全部</a></div>
    <div class="option-child new-standard   [#if loanCategory=='1']active[/#if] "><a href="${path}/wap/bid/loanlist?loanCategory=1">新手标</a></div>
    <div class="option-child optimizing-financia   [#if loanCategory=='2']active[/#if] "><a href="${path}/wap/bid/loanlist?loanCategory=2">优选理财</a></div>
</div>
<!--全部的详情部分-->
<div id="loan">
<div class="details invest" id="loans" style="background-color: white;">

</div>
</div>
<!--底部-->
[#include "/wap/include/footer.ftl"]
</body>
<script>

    $(function(){
        $('#loan').dropload({
            scrollArea : window,
            loadDownFn : function(me){
                next(page);

            }
        });

    });
    var page = 1;
    next(page);
    function next(pg){
        ajax({
            url: "${path}/wap/bid/loanAjax?loanCategory=${loanCategory}",
            type: "POST",
            dataType: "text",
            cache: false,
            data:{"currentPage":pg},
            success: function(result) {
                $("#loans").append(result);
                page = page+1;


            },error:function(result){

            }
        });


    }
</script>
<script src="${path}/resources/wap/js/load/dropload.min.js"></script>
<script src="${path}/resources/wap/js/invest/invest.js"></script>
</html>